﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace HdipCricketClub.Models
{
       
    [MetadataType(typeof(FixtureMetaData))]
    public partial class Fixture
    {
    }

    public class FixtureMetaData
    {
        [Required(ErrorMessage = "Type is required")]
        [Display(Name = "Type:")]
        public object type;

        [Required(ErrorMessage = "Home or Away must be specified")]
        [Display (Name = "Home Fixture:")]
        public object home;

        [Required (ErrorMessage = "Date is required")]
        [Display(Name = "Date:")]
        [DataType(DataType.Date, ErrorMessage = "Incorrect date entered")]
        public object date;

        [Required(ErrorMessage = "Start time is required")]
        [Display(Name = "Start Time:")]
        [DataType(DataType.Time, ErrorMessage = "Incorrect time entered")]
        public object start_time;

        [Required(ErrorMessage = "No of Players is required")]
        [Display(Name = "Number of Players:")]
        public object no_of_players;
                
        public bool batted_first;

    }


}